package com.leyou.common.exceptions;


import com.leyou.common.enums.ExceptionEnum;
import lombok.Getter;

@Getter
public class LyException extends RuntimeException {
    private int status;

    /*public LyException(int status ,String message) {
        super(message);
        this.status = status;
    }

    public LyException(int status,String message, Throwable e) {
        super(message, e);
        this.status = status;
    }*/

    public LyException(ExceptionEnum  em){
        super(em.getMessage());
        this.status= em.getStatus();
    }
    public LyException(ExceptionEnum  em,Throwable throwable){
        super(em.getMessage(),throwable);
        this.status= em.getStatus();
    }

}
